package org.spring.springboot.server.Impl;

import org.spring.springboot.dao.IntervieweeManageDao;
import org.spring.springboot.entity.IntervieweeManage;
import org.spring.springboot.server.IntervieweeManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class IntervieweeManageServiceImpl implements IntervieweeManageService {

    @Autowired
    private IntervieweeManageDao intervieweeManageDao;

    @Override
    public void addUser(IntervieweeManage im) {
        intervieweeManageDao.insert(im);
    }

    @Override
    public List<String> getUserNameList() {
        return intervieweeManageDao.getUserNameList();
    }

    @Override
    public void updateUser(IntervieweeManage im) {
        intervieweeManageDao.update(im);
    }

    @Override
    public void deleteUser(Integer id){
        intervieweeManageDao.delete(id);
    }

    @Override
    public List<Map<String, Object>> selectmobile(String name) {
        return intervieweeManageDao.selectByName(name);
    }

    @Override
    public List<Map<String, Object>> selectinterviewee(String name,String mobile) {
        return intervieweeManageDao.selectByNameAndMobile(name,mobile);
    }

    @Override
    public List<Map<String, Object>> getUserList() {
        return intervieweeManageDao.selectUser();
    }

}
